<template functional>
  <div>
    <el-form label-width="110px" v-if="props.isCompany">
      <el-form-item label="公司名称:">
        <div>
          {{ props.data.ccompany || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="邮编:">
        <div>
          {{ props.data.ppostcode || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="省市:">
        <div>
          {{ props.data.ccity.name || "无" }}
          {{ props.data.ccity.province.name }}
        </div>
      </el-form-item>

      <el-form-item label="地址:">
        {{ props.data.aaddress || "无" }}
      </el-form-item>

      <el-form-item label="联系人:">
        <div>
          {{ props.data.contacter || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="联系方式:">
        <div>
          {{ props.data.contactway || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="备注:">
        <div>
          {{ props.data.remark || "无" }}
        </div>
      </el-form-item>
    </el-form>

    <el-form label-width="110px" v-else>
      <el-form-item label="部门名称:">
        <div>
          {{ props.data.deptname || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="部门联系人:">
        <div>
          {{ props.data.contactor || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="联系方式:">
        <div>
          {{ props.data.contactway || "无" }}
        </div>
      </el-form-item>

      <el-form-item label="备注:">
        <div>
          {{ props.data.remark || "无" }}
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      required: true,
    },

    isCompany: {
      type: Boolean,
      required: false,
      default: () => false,
    },
  },
};
</script>
